<?php
/**
 * @file
 * Returns the HTML for a single Drupal page.
 *
 * Complete documentation for this file is available online.
 * @see https://drupal.org/node/1728148
 */
global $theme_path;
?>

<?php print render( $page['navigation'] ); ?>

<div id="page">
	<?php print render( $page['help'] ); ?>

    <header class="header" id="header" role="banner">
        <div class="wrapper">

            <div class="menu-trigger"></div>
            <div class="search-trigger"></div>
            <div class="font-size-trigger"></div>
			<?php if ( $logo ): ?>
                <a href="<?php print $front_page; ?>" title="<?php print t( 'Home' ); ?>" rel="home" class="header__logo" id="logo">
                    <img src="<?php print $logo; ?>" alt="<?php print t( 'Home' ); ?>" class="header__logo-image"/>
                </a>
			<?php endif; ?>

			<?php print render( $page['header'] ); ?>

        </div>
    </header>

    <div id="main">
		<?php print $messages; ?>
		<?php print render( $page['highlighted'] ); ?>

		<?php if ( $title ): ?>
            <h1 class="page__title title element-invisible" id="page-title"><?php print $title; ?></h1>
		<?php endif; ?>

        <?php print bck_render_('ads-mobile-top-320x90'); ?>
		<?php print $breadcrumb; ?>

        <div id="content" class="column region-content" role="main">
            <article class="app" data-nid="<?php echo $node->nid; ?>">

                <?php print bck_render_('ads-article-300x250'); ?>

                <div class="wrapper">
                    <div class="article-inner">
						<?php print render( $title_prefix ); ?>
						<?php print render( $title_suffix ); ?>
						<?php print render( $tabs ); ?>
						<?php if ( $action_links ): ?>
                            <ul class="action-links"><?php print render( $action_links ); ?></ul>
						<?php endif; ?>


                        <h2 class="node-title"><?php print $title; ?></h2>

                        <div class="article-top">
							<?php echo jessica_thm_author_author_section( $node ); ?>
                            <div class="article-share-amount">
								<?php if ( ! empty( $node->field_social_count ) ): ?>
                                    <strong><?php print $node->field_social_count['und'][0]['value']; ?></strong>
								<?php else: ?>
                                    <strong>0</strong>
								<?php endif; ?>SHARES
                            </div>
                            <div class="article-share-action">
                                <a href="#" class="article-share-close icon icon-cross"></a>
                                <a href="#" class="article-share-icon icon icon-facebook"></a>
                                <a href="#" class="article-share-icon icon icon-sina"></a>
                                <a href="#" class="article-share-icon icon icon-whatsapp"></a>
                                <a href="#" class="article-share-icon icon icon-pinterest"></a>
                                <a href="#" class="article-share-icon icon icon-email"></a>
                                <a href="#" class="article-share-toggle icon icon-share"></a>
                            </div>
                        </div>

						<!-- slideshow -->
                        <div class="field-body">
		                    <?php // print render($field_collection['field_body']); ?>
                            <div class="gallery-slideshow-wrapper">
                                <div class="gallery-popup-btn">
                                    <strong>READ MORE</strong>
                                    <span></span> photos
                                </div>
                                <div class="gallery-popup">
                                    <div class="gallery-popup-list"></div>
                                </div>
                                <div class="gallery-last-slide">
                                    <div class="gallery-last-slide-wrapper"></div>
                                </div>
                                <div class="gallery-slideshow"></div>
                            </div>
                        </div>
						<!-- slideshow end -->
						<!-- gallery suggestion -->
                        <div class="gallery-suggestion">
                            <?php echo render_(field_view_field('node', $node, 'field_previous_gallery', array('label' => 'hidden', 'type' => 'jessica_fmt_prev_next_gallery', 'settings' => array('no_wrapper' => 1)))); ?>
                        	<?php echo render_(field_view_field('node', $node, 'field_next_gallery', array('label' => 'hidden', 'type' => 'jessica_fmt_prev_next_gallery', 'settings' => array('no_wrapper' => 1)))); ?>
                        </div>
	                    <?php
							//print render($page['fb_comments']);
							//print _get_block('scmedia_fb_comment','facebook_comment');
						?>

                        <?php //print render($page['content']); ?>
						<?php print render( $page['sidebar_first'] ); ?>

						<?php //print _get_block( 'scmedia_fb_comment', 'facebook_comment' ); ?>

                        <div class="article-readmore">
                            <a href="#">Read More</a>
                        </div>
                    </div>

					<?php print render( $page['sidebar_second'] ); ?>
                    <?php echo bck_render_('most-read-popular-msw-gallery', 0);?>
                    <?php echo bck_render_('gallery-related-article-mobile', 0);?>


                    <div class="article-subscribe">
                        <?php print render($page['mc_below_content']);  ?>
                    </div>

					<?php //print render($page['content']); ?>
					<?php //print $feed_icons; ?>
                </div>
            </article>
            <div id="article-loading"></div>
        </div>
		<?php //print render($page['below_content']); ?>
		<?php print render( $page['bottom'] ); ?>
		<?php print render( $page['footer'] ); ?>
    </div>

</div>

<?php print render( $page['popup'] ); ?>
<?php print render( $page['overlay'] ); ?>
<?php print render( $page['hidden'] ); ?>
